﻿#pragma once

#include <chrono>
#include <string>
#include <thread>

#include "logger\ILogger.h"

namespace Logging {
/**
 * @struct LogMessageInfo
 * @brief 包含单条日志信息的结构体。
 */
struct LOGGER_API LogMessageInfo {
  std::chrono::system_clock::time_point timestamp;
  std::thread::id thread_id;
  LogLevel level;
  std::string message;
  std::string category;

  LogMessageInfo() = default;

  // 移动构造函数，用于高效传递
  LogMessageInfo(LogLevel lvl, std::string&& category, std::string&& msg)
      : timestamp(std::chrono::system_clock::now()),
        thread_id(std::this_thread::get_id()),
        level(lvl),
        category(std::move(category)),
        message(std::move(msg)) {}
};
}  // namespace Logging
